/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2025-07-06     86191       the first version
 */
#ifndef APPLICATIONS_4G_H_
#define APPLICATIONS_4G_H_

#include <rtthread.h>
#include <rtdevice.h>
#include <finsh.h>
#include <string.h>
#include <stdio.h>
/* 调试标签定义 */
#define DBG_TAG "4g"
#define DBG_LVL DBG_INFO
#include <rtdbg.h>
#ifdef __cplusplus
extern "C" {
#endif

/* 宏定义 */
#define UART_DEVICE_NAME    "uart5"  // 串口设备名称，可根据实际情况修改
/* 线程优先级、栈大小和线程控制块定义 */
#define lte_THREAD_PRIORITY       28
#define lte_THREAD_STACK_SIZE     2048
#define lte_THREAD_TIMESLICE      5

/* 函数声明 */
int uart_sample_init(void);
void send_at_command(const char *cmd);
void cmd_send_at(int argc, char **argv);
void cmd_check_network(int argc, char **argv);
void cmd_check_mqtt(int argc, char **argv);
void cmd_config_mqtt(int argc, char **argv);
void cmd_connect_mqtt(int argc, char **argv);
void cmd_subscribe_topic(int argc, char **argv);
void cmd_4grst(int argc, char **argv);
void cmd_4gmqtt_full(int argc, char **argv);
void cmd_4g_disconnect(int argc, char **argv);
void send_data_thread(void *parameter);
void cmd_start_send(int argc, char **argv);
void cmd_stop_send(int argc, char **argv);


#ifdef __cplusplus
}
#endif
#endif /* APPLICATIONS_4G_H_ */
